home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
ddj1291.zip
/
STAT.ZIP
/
SOURCE.ZIP
/
PAWHERE.C
< prev
Wrap
C/C++ Source or Header
|
1990-05-09
|
780b
|
31 lines
/*
** File: pawhere.c
**
** Copyright 1990
** Fred Motteler and Applied Microsystems Corporation
** All Rights Reserved
**
** Description: This file contains a very simple program that returns its
** segment base address. Note that this program is Lattice
** version 6.01 specific in that the Lattice small model
** has "main" at the beginning of the exectable portion of
** the program. Other compiler/linker packages may require
** that the program map be examine for the module that starts
** the program.
*/
#include <dos.h>
#include <stdio.h>
unsigned int
main()
{
FILE *fp;
fp = fopen("pawhere.tmp", "w");
fprintf(fp, "%x %x\n",
(FP_SEG((char far *) main)), (FP_OFF((char far *) main)));
fclose(fp);
exit(0);
}